﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 构造方法02
{
    class Student
    {
        private int id;
        public int ID
        {
            get { return id; }
        }

        private string name;
        public string Name
        {
            get { return name; }
        }

        private Teacher nowTeacher;
        public Teacher NowTeacher
        {
            get { return nowTeacher; }
            set { nowTeacher = value; }
        }

        public Student(int id, string name, Teacher nowT)
        {
            this.id = id;
            this.name = name;
            this.nowTeacher = nowT;
        }
    }
}
